<template>
  <a-modal
    :title="title"
    v-model="subValue"
    class="statistic__dialog"
    :width="500"
    :maskClosable="false"
    :confirmLoading="loading"
    :footer="null"
  >
    <div class="content">
      <div style="line-height: 34px">
        <a-row>
          <a-col :span="4" style="text-align: right">员工姓名：</a-col>
          <a-col :span="20">{{((record || {}).userInfo||{}).username}}</a-col>
        </a-row>
        <a-row>
          <a-col :span="4" style="text-align: right">部门：</a-col>
          <a-col :span="20">{{((((record||{}).userInfo||{}).employee||{}).lasDepartmentinfo||{}).depname}}</a-col>
        </a-row>
        <a-row>
          <a-col :span="4" style="text-align: right">请假类型：</a-col>
          <a-col :span="20">{{((((record||{}).detailFormList || [])[0] || {}).lasCode||{}).item_desc}}</a-col>
        </a-row>
        <a-row>
          <a-col :span="4" style="text-align: right">开始时间：</a-col>
          <a-col :span="20">{{((record.detailFormList || [])[0]||{}).startTime}}</a-col>
        </a-row>
        <a-row>
          <a-col :span="4" style="text-align: right">结束时间：</a-col>
          <a-col :span="20">{{((record.detailFormList||[])[0]||{}).endTime}}</a-col>
        </a-row>
        <a-row>
          <a-col :span="4" style="text-align: right">请假时长：</a-col>
          <a-col :span="20">{{((record.detailFormList||[])[0]||{}).leaveDays}}小时</a-col>
        </a-row>
        <a-row>
          <a-col :span="4" style="text-align: right">请假事由：</a-col>
          <a-col :span="20">{{((record.detailFormList||[])[0]||{}).leaveReason}}</a-col>
        </a-row>
        <a-row>
          <a-col :span="4" style="text-align: right">备注：</a-col>
          <a-col :span="20">{{((record.detailFormList||[])[0]||{}).leaveComment}}</a-col>
        </a-row>
      </div>
    </div>
  </a-modal>
</template>

<script>
import ModelMixins from '@/mixin/modelMixins'

export default {
  name: 'StatisticsDialog',
  mixins: [ModelMixins],
  props: {
    record: {
      type: Object
    }
  },
  data () {
    return {
      title: '请假详情',
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },
      loading: false
    }
  },
  methods: {
    close () {
      this.subValue = false
    }
  }
}
</script>

<style scoped lang="less">

</style>
